package com.itheima.jobs;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.service.OrderSettingService;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@Component
@RestController
public class ClearImgJob {

    @Reference
    OrderSettingService orderSettingService;

    public void clearImg(){
        try {
      orderSettingService.findAll();

        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}



     /*   //1.获取集合SETMEAL_PIC_RESOURCES  -  SETMEAL_PIC_DB_RESOURCES=差集
        Set<String> fileNameSet = jedisPool.getResource().sdiff(RedisConstant.SETMEAL_PIC_RESOURCES, RedisConstant.SETMEAL_PIC_DB_RESOURCES);

        //2.调用七牛云接口删除图片 （已经存在）
        for (String fileName : fileNameSet) {
            QiniuUtils.deleteFileFromQiniu(fileName);
            //3.删除SETMEAL_PIC_RESOURCES集合中的垃圾图片
            jedisPool.getResource().srem(RedisConstant.SETMEAL_PIC_RESOURCES,fileName);
        }*/


